<script setup lang="ts">
    const emits = defineEmits(["click","suibian"]);
    defineProps(["userName"]);
</script>

<template>
    <h3>Child</h3>
    <button @click="emits('click',1)">点我</button>
    <button @click="emits('suibian',2)" >点我suibian</button>
    <button @click="$attrs.onMy(3)" >点我my</button>
    <h3>{{userName}}</h3>
</template>

<style scoped>

</style>